namelist = ["林","张","李","王","赵"]
#获取第二个人
name = namelist[2]
print(name)

#遍历列表
namelist = ["林","张","李","王","赵"]
for hah in namelist:
    print(hah)
    
#增加元素
namelist = ["林","张","李","王","赵"]
namelist.append("胡")
print(namelist)

#删除元素
#方式1：通过pop删除指定索引元素
namelist = ["林","张","李","王","赵"]
namelist.pop(0)
print(namelist)

#方式2：通过remove删除指定内容元素
namelist = ["林","张","李","王","赵"]
namelist.remove("张")
print(namelist)








